package pingji.dao.submit.impl;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import pingji.controller.submit.SubmitObject;
import pingji.controller.submit.SubmitResponseObject;
import pingji.dao.mapper.OrderMapper;
import pingji.dao.submit.SubmitDao;
import pingji.pojo.Order;
@Repository
public class SubmitDaoImpl implements SubmitDao {
    @Autowired
    OrderMapper mapper;
    @Override
    public SubmitResponseObject submit(SubmitObject so) {
        mapper.submitUpdate(so);
        Order o = mapper.selectById(so.getOrderId());
        SubmitResponseObject sro=new SubmitResponseObject(o);
        return sro;
    }
}
